package robocode.rescue;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

public class ConstantesExecucao {
	
	public static String caminhoProjetoJason;
	public static String caminhoProjetoRobocode;
	public static String caminhoRobocode;
	public static String caminhoDesktop;
	public static String caminhoEnvironment;
	public static String caminhoDiretorioClasses;
	
	public static String nomeTeamA;
	public static String nomeTeamB;
	
	public static void start(){
		try {
			File arquivo = new File("caminhos.properties");
			FileInputStream input;
			
			input = new FileInputStream(arquivo);
			Properties props = new Properties();
			props.load(input);
			
			caminhoProjetoJason = props.getProperty("projetoJason");
			caminhoProjetoRobocode = props.getProperty("projetoRobocode");
			caminhoRobocode = props.getProperty("robocode");
			caminhoDesktop = props.getProperty("desktop");
			caminhoEnvironment = props.getProperty("Environment");
			caminhoDiretorioClasses = props.getProperty("diretorioClasses");
			
			arquivo = new File("teams.properties");
			input = new FileInputStream(arquivo);
			props = new Properties();
			props.load(input);
			
			nomeTeamA = props.getProperty("nomeTeamA");
			nomeTeamB = props.getProperty("nomeTeamB");
			
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
